
/*var  a = document.getElementById('drink-menu') 

a.innerHTML='av'

a.innerHTML = 'ABC <span style="color:red">RED</span> XYZ';

a.innerText = 'ABC <span style="color:red">RED</span> XYZ';//更新dom

var 吧= document.getElementsByName()

// 获取<p id="p-id">...</p>
var p = document.getElementById('p-id');
// 设置文本:
p.innerText = '<script>alert("Hi")</script>';
// HTML被自动编码，无法设置一个<script>节点:
// <p id="p-id">&lt;script&gt;alert("Hi")&lt;/script&gt;</p>
*/

var js = document.getElementById('test-js')

js.innerHTML = 'JavaScript'

js.style.color= '#ff0000'

js.style.fontWeight = 'bold'

if (js && js.parentNode && js.parentNode.id === 'test-div' && js.id === 'test-js') {
    if (js.innerText === 'JavaScript') {
        if (js.style && js.style.fontWeight === 'bold' && (js.style.color === 'red' || js.style.color === '#ff0000' || js.style.color === '#f00' || js.style.color === 'rgb(255, 0, 0)')) {
            console.log('测试通过!');
        } else {
            console.log('CSS样式测试失败!');
        }
    } else {
        console.log('文本测试失败!');
    }
} else {
    console.log('节点测试失败!');
}